package com.bnzj.cloud.business.core.persistence.entity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import com.bnzj.core.persistence.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author barry
 * @date 2019-09-27
 */
@Getter
@Setter
@ToString(callSuper = true)
@Entity
@Table(name = "bnz_sys_dictionary")
@Schema(description = "数据字典")
public class SysDictionary extends BaseEntity {
    private static final long serialVersionUID = -7096237481404713374L;

    @Schema(description = "名称")
    @NotNull(message = "名称不能为空！")
    private String name;
    
    @Transient
    @Schema(description = "类型名称")
    private String typeName;
    
    @Transient
    @Schema(description = "类型编码")
    private String typeCode;
    
    @Schema(description = "描述")
    private String description;
    @Schema(description = "对应值")
    private String value;
    @Schema(description = "类型ID")
    private Long typeId;
    @Schema(description = "序列")
    private Short sequence;
    @Schema(description = "是否删除")
    private Boolean deleted = false;

}
